Chooses how the whole game’s movers meet slopes: true, they stand on their feet (a platformer: the bottom middle of the body rests on the slope and the body walks up and down it); false, the whole body meets the slope (a top-down game: a body pushed into a diagonal wall slides along it).
slope_feet(on)| Name | Type |
|---|---|
on | bool |
Nothing.
Chooses how every body in the game meets a slope.
true: bodies stand on their feet. The one pixel column at the bottom middle of a body rests on the slope, the body walks up and down it, and its upper part still meets walls and ceilings as a whole. This is what a platformer wants. The Slopes page has the picture.false: a body is a whole box. Pushed into a slope or a diagonal wall in any direction (up, down, left or right) it slides along it. This is what a top-down game wants, where there is no ground to stand on.It covers every object that moves with move_slide or move_slide_solid, and every tile_free question, in every room, until it is called again.
The Player movement tab decides for you when the project is built: feet on when the game has a platformer or an auto-runner, off when its designs are all top-down, grid, ship or spin, and on when there are no designs. Call slope_feet once, in a Create event, only to choose differently: a top-down game with a platformer room, or a platformer that you moved by hand.
It changes nothing in a room with no slope.
slope_feet(false);Makes every body a whole box that slides along diagonal walls, for a game that has no ground.
The Player movement designs set it for you when the project is built: on for a game with a platformer or an auto-runner, off for a game whose designs are all top-down, grid, ship or spin, and on when there are no designs. Call this only to choose differently, once, in a Create event. It covers every object that moves with move_slide, move_slide_solid or tile_free, in every room, until it is called again. It changes nothing in a room with no slope.